Merge remote-tracking branch 'origin'

Conflicts:
config/environments/production.rb

Johannes Engelke | hybris 10 years ago
parent
commit
0d03221acb

+ 9 - 9
Gemfile

@@ -50,7 +50,7 @@ gem 'protected_attributes', '~>1.0.8' # This must be loaded before some other ge
50 50
 gem 'ace-rails-ap', '~> 2.0.1'
51 51
 gem 'bootstrap-kaminari-views', '~> 0.0.3'
52 52
 gem 'bundler', '>= 1.5.0'
53
-gem 'coffee-rails', '~> 4.0.0'
53
+gem 'coffee-rails', '~> 4.1.0'
54 54
 gem 'daemons', '~> 1.1.9'
55 55
 gem 'delayed_job', '~> 4.0.0'
56 56
 gem 'delayed_job_active_record', '~> 4.0.0'
@@ -59,7 +59,7 @@ gem 'em-http-request', '~> 1.1.2'
59 59
 gem 'faraday', '~> 0.9.0'
60 60
 gem 'faraday_middleware'
61 61
 gem 'feed-normalizer'
62
-gem 'font-awesome-sass'
62
+gem 'font-awesome-sass', '~> 4.3'
63 63
 gem 'foreman', '~> 0.63.0'
64 64
 # geokit-rails doesn't work with geokit 1.8.X but it specifies ~> 1.5
65 65
 # in its own Gemfile.
@@ -76,9 +76,9 @@ gem 'mysql2', '~> 0.3.16'
76 76
 gem 'multi_xml'
77 77
 gem 'nokogiri', '~> 1.6.4'
78 78
 gem 'omniauth'
79
-gem 'rails' , '4.1.8'
79
+gem 'rails' , '4.2.1'
80 80
 gem 'rufus-scheduler', '~> 3.0.8', require: false
81
-gem 'sass-rails',   '~> 4.0.0'
81
+gem 'sass-rails',   '~> 5.0'
82 82
 gem 'select2-rails', '~> 3.5.4'
83 83
 gem 'spectrum-rails'
84 84
 gem 'string-scrub'	# for ruby <2.1
@@ -101,12 +101,12 @@ group :development, :test do
101 101
   gem 'dotenv-rails'
102 102
   gem 'pry'
103 103
   gem 'rr'
104
-  gem 'rspec', '~> 3.0'
105
-  gem 'rspec-collection_matchers', '~> 1.0.0'
106
-  gem 'rspec-rails', '~> 3.0.1'
107
-  gem 'rspec-html-matchers', '~> 0.6.1'
104
+  gem 'rspec', '~> 3.2'
105
+  gem 'rspec-collection_matchers', '~> 1.1.0'
106
+  gem 'rspec-rails', '~> 3.1'
107
+  gem 'rspec-html-matchers', '~> 0.7'
108 108
   gem 'shoulda-matchers'
109
-  gem 'spring', '~> 1.3.2'
109
+  gem 'spring', '~> 1.3.0'
110 110
   gem 'spring-commands-rspec'
111 111
   gem 'vcr'
112 112
   gem 'webmock', '~> 1.17.4', require: false

+ 129 - 101
Gemfile.lock

@@ -12,60 +12,69 @@ GEM
12 12
   remote: https://rubygems.org/
13 13
   specs:
14 14
     ace-rails-ap (2.0.1)
15
-    actionmailer (4.1.8)
16
-      actionpack (= 4.1.8)
17
-      actionview (= 4.1.8)
15
+    actionmailer (4.2.1)
16
+      actionpack (= 4.2.1)
17
+      actionview (= 4.2.1)
18
+      activejob (= 4.2.1)
18 19
       mail (~> 2.5, >= 2.5.4)
19
-    actionpack (4.1.8)
20
-      actionview (= 4.1.8)
21
-      activesupport (= 4.1.8)
22
-      rack (~> 1.5.2)
20
+      rails-dom-testing (~> 1.0, >= 1.0.5)
21
+    actionpack (4.2.1)
22
+      actionview (= 4.2.1)
23
+      activesupport (= 4.2.1)
24
+      rack (~> 1.6)
23 25
       rack-test (~> 0.6.2)
24
-    actionview (4.1.8)
25
-      activesupport (= 4.1.8)
26
+      rails-dom-testing (~> 1.0, >= 1.0.5)
27
+      rails-html-sanitizer (~> 1.0, >= 1.0.1)
28
+    actionview (4.2.1)
29
+      activesupport (= 4.2.1)
26 30
       builder (~> 3.1)
27 31
       erubis (~> 2.7.0)
28
-    activemodel (4.1.8)
29
-      activesupport (= 4.1.8)
32
+      rails-dom-testing (~> 1.0, >= 1.0.5)
33
+      rails-html-sanitizer (~> 1.0, >= 1.0.1)
34
+    activejob (4.2.1)
35
+      activesupport (= 4.2.1)
36
+      globalid (>= 0.3.0)
37
+    activemodel (4.2.1)
38
+      activesupport (= 4.2.1)
30 39
       builder (~> 3.1)
31
-    activerecord (4.1.8)
32
-      activemodel (= 4.1.8)
33
-      activesupport (= 4.1.8)
34
-      arel (~> 5.0.0)
35
-    activesupport (4.1.8)
36
-      i18n (~> 0.6, >= 0.6.9)
40
+    activerecord (4.2.1)
41
+      activemodel (= 4.2.1)
42
+      activesupport (= 4.2.1)
43
+      arel (~> 6.0)
44
+    activesupport (4.2.1)
45
+      i18n (~> 0.7)
37 46
       json (~> 1.7, >= 1.7.7)
38 47
       minitest (~> 5.1)
39
-      thread_safe (~> 0.1)
48
+      thread_safe (~> 0.3, >= 0.3.4)
40 49
       tzinfo (~> 1.1)
41 50
     addressable (2.3.7)
42
-    arel (5.0.1.20140414130214)
51
+    arel (6.0.0)
43 52
     autoparse (0.3.3)
44 53
       addressable (>= 2.3.1)
45 54
       extlib (>= 0.9.15)
46 55
       multi_json (>= 1.0.0)
47
-    bcrypt (3.1.7)
56
+    bcrypt (3.1.10)
48 57
     better_errors (1.1.0)
49 58
       coderay (>= 1.0.0)
50 59
       erubis (>= 2.6.6)
51 60
     binding_of_caller (0.7.2)
52 61
       debug_inspector (>= 0.0.1)
53
-    bootstrap-kaminari-views (0.0.3)
62
+    bootstrap-kaminari-views (0.0.5)
54 63
       kaminari (>= 0.13)
55 64
       rails (>= 3.1)
56 65
     buftok (0.2.0)
57 66
     builder (3.2.2)
58
-    celluloid (0.15.2)
59
-      timers (~> 1.1.0)
67
+    celluloid (0.16.0)
68
+      timers (~> 4.0.0)
60 69
     chronic (0.10.2)
61 70
     coderay (1.1.0)
62
-    coffee-rails (4.0.1)
71
+    coffee-rails (4.1.0)
63 72
       coffee-script (>= 2.2.0)
64 73
       railties (>= 4.0.0, < 5.0)
65 74
     coffee-script (2.3.0)
66 75
       coffee-script-source
67 76
       execjs
68
-    coffee-script-source (1.7.1)
77
+    coffee-script-source (1.9.1)
69 78
     cookiejar (0.3.2)
70 79
     coveralls (0.7.1)
71 80
       multi_json (~> 1.3)
@@ -77,14 +86,14 @@ GEM
77 86
       safe_yaml (~> 1.0.0)
78 87
     daemons (1.1.9)
79 88
     debug_inspector (0.0.2)
80
-    delayed_job (4.0.2)
81
-      activesupport (>= 3.0, < 4.2)
82
-    delayed_job_active_record (4.0.2)
83
-      activerecord (>= 3.0, < 4.2)
89
+    delayed_job (4.0.6)
90
+      activesupport (>= 3.0, < 5.0)
91
+    delayed_job_active_record (4.0.3)
92
+      activerecord (>= 3.0, < 5.0)
84 93
       delayed_job (>= 3.0, < 4.1)
85 94
     delorean (2.1.0)
86 95
       chronic
87
-    devise (3.4.0)
96
+    devise (3.4.1)
88 97
       bcrypt (~> 3.0)
89 98
       orm_adapter (~> 0.1)
90 99
       railties (>= 3.2.6, < 5)
@@ -130,7 +139,7 @@ GEM
130 139
       hpricot (>= 0.6)
131 140
       simple-rss (>= 1.1)
132 141
     ffi (1.9.5)
133
-    font-awesome-sass (4.2.0)
142
+    font-awesome-sass (4.3.1)
134 143
       sass (~> 3.2)
135 144
     forecast_io (2.0.0)
136 145
       faraday
@@ -145,6 +154,8 @@ GEM
145 154
     geokit-rails (2.0.1)
146 155
       geokit (~> 1.5)
147 156
       rails (>= 3.0)
157
+    globalid (0.3.3)
158
+      activesupport (>= 4.1.0)
148 159
     google-api-client (0.7.1)
149 160
       addressable (>= 2.3.2)
150 161
       autoparse (>= 0.3.3)
@@ -174,6 +185,7 @@ GEM
174 185
     hike (1.2.3)
175 186
     hipchat (1.2.0)
176 187
       httparty
188
+    hitimes (1.2.2)
177 189
     hpricot (0.8.6)
178 190
     httmultiparty (0.3.10)
179 191
       httparty (>= 0.7.3)
@@ -207,6 +219,8 @@ GEM
207 219
       celluloid (>= 0.15.2)
208 220
       rb-fsevent (>= 0.9.3)
209 221
       rb-inotify (>= 0.9)
222
+    loofah (2.0.1)
223
+      nokogiri (>= 1.5.9)
210 224
     lumberjack (1.0.9)
211 225
     macaddr (1.7.1)
212 226
       systemu (~> 2.6.2)
@@ -217,9 +231,9 @@ GEM
217 231
     method_source (0.8.2)
218 232
     mime-types (2.4.3)
219 233
     mini_portile (0.6.2)
220
-    minitest (5.5.0)
234
+    minitest (5.5.1)
221 235
     mqtt (0.3.1)
222
-    multi_json (1.10.1)
236
+    multi_json (1.11.0)
223 237
     multi_xml (0.5.5)
224 238
     multipart-post (2.0.0)
225 239
     mysql2 (0.3.16)
@@ -265,29 +279,38 @@ GEM
265 279
       coderay (~> 1.1.0)
266 280
       method_source (~> 0.8.1)
267 281
       slop (~> 3.4)
268
-    quiet_assets (1.0.3)
282
+    quiet_assets (1.1.0)
269 283
       railties (>= 3.1, < 5.0)
270
-    rack (1.5.2)
271
-    rack-test (0.6.2)
284
+    rack (1.6.0)
285
+    rack-test (0.6.3)
272 286
       rack (>= 1.0)
273
-    rails (4.1.8)
274
-      actionmailer (= 4.1.8)
275
-      actionpack (= 4.1.8)
276
-      actionview (= 4.1.8)
277
-      activemodel (= 4.1.8)
278
-      activerecord (= 4.1.8)
279
-      activesupport (= 4.1.8)
287
+    rails (4.2.1)
288
+      actionmailer (= 4.2.1)
289
+      actionpack (= 4.2.1)
290
+      actionview (= 4.2.1)
291
+      activejob (= 4.2.1)
292
+      activemodel (= 4.2.1)
293
+      activerecord (= 4.2.1)
294
+      activesupport (= 4.2.1)
280 295
       bundler (>= 1.3.0, < 2.0)
281
-      railties (= 4.1.8)
282
-      sprockets-rails (~> 2.0)
283
-    rails_12factor (0.0.2)
296
+      railties (= 4.2.1)
297
+      sprockets-rails
298
+    rails-deprecated_sanitizer (1.0.3)
299
+      activesupport (>= 4.2.0.alpha)
300
+    rails-dom-testing (1.0.6)
301
+      activesupport (>= 4.2.0.beta, < 5.0)
302
+      nokogiri (~> 1.6.0)
303
+      rails-deprecated_sanitizer (>= 1.0.1)
304
+    rails-html-sanitizer (1.0.2)
305
+      loofah (~> 2.0)
306
+    rails_12factor (0.0.3)
284 307
       rails_serve_static_assets
285 308
       rails_stdout_logging
286
-    rails_serve_static_assets (0.0.2)
309
+    rails_serve_static_assets (0.0.4)
287 310
     rails_stdout_logging (0.0.3)
288
-    railties (4.1.8)
289
-      actionpack (= 4.1.8)
290
-      activesupport (= 4.1.8)
311
+    railties (4.2.1)
312
+      actionpack (= 4.2.1)
313
+      activesupport (= 4.2.1)
291 314
       rake (>= 0.8.7)
292 315
       thor (>= 0.18.1, < 2.0)
293 316
     raindrops (0.13.0)
@@ -295,57 +318,61 @@ GEM
295 318
     rb-fsevent (0.9.4)
296 319
     rb-inotify (0.9.5)
297 320
       ffi (>= 0.5.0)
321
+    rdoc (4.2.0)
322
+      json (~> 1.4)
298 323
     ref (1.0.5)
299
-    responders (1.1.1)
300
-      railties (>= 3.2, < 4.2)
324
+    responders (2.1.0)
325
+      railties (>= 4.2.0, < 5)
301 326
     rest-client (1.7.3)
302 327
       mime-types (>= 1.16, < 3.0)
303 328
       netrc (~> 0.7)
304
-    retriable (1.4.1)
329
+    retriable (2.0.2)
305 330
     rr (1.1.2)
306
-    rspec (3.0.0)
307
-      rspec-core (~> 3.0.0)
308
-      rspec-expectations (~> 3.0.0)
309
-      rspec-mocks (~> 3.0.0)
310
-    rspec-collection_matchers (1.0.0)
331
+    rspec (3.2.0)
332
+      rspec-core (~> 3.2.0)
333
+      rspec-expectations (~> 3.2.0)
334
+      rspec-mocks (~> 3.2.0)
335
+    rspec-collection_matchers (1.1.2)
311 336
       rspec-expectations (>= 2.99.0.beta1)
312
-    rspec-core (3.0.4)
313
-      rspec-support (~> 3.0.0)
314
-    rspec-expectations (3.0.4)
337
+    rspec-core (3.2.1)
338
+      rspec-support (~> 3.2.0)
339
+    rspec-expectations (3.2.0)
315 340
       diff-lcs (>= 1.2.0, < 2.0)
316
-      rspec-support (~> 3.0.0)
317
-    rspec-html-matchers (0.6.1)
341
+      rspec-support (~> 3.2.0)
342
+    rspec-html-matchers (0.7.0)
318 343
       nokogiri (~> 1)
319 344
       rspec (~> 3)
320
-    rspec-mocks (3.0.4)
321
-      rspec-support (~> 3.0.0)
322
-    rspec-rails (3.0.2)
323
-      actionpack (>= 3.0)
324
-      activesupport (>= 3.0)
325
-      railties (>= 3.0)
326
-      rspec-core (~> 3.0.0)
327
-      rspec-expectations (~> 3.0.0)
328
-      rspec-mocks (~> 3.0.0)
329
-      rspec-support (~> 3.0.0)
330
-    rspec-support (3.0.4)
345
+    rspec-mocks (3.2.1)
346
+      diff-lcs (>= 1.2.0, < 2.0)
347
+      rspec-support (~> 3.2.0)
348
+    rspec-rails (3.2.1)
349
+      actionpack (>= 3.0, < 4.3)
350
+      activesupport (>= 3.0, < 4.3)
351
+      railties (>= 3.0, < 4.3)
352
+      rspec-core (~> 3.2.0)
353
+      rspec-expectations (~> 3.2.0)
354
+      rspec-mocks (~> 3.2.0)
355
+      rspec-support (~> 3.2.0)
356
+    rspec-support (3.2.2)
331 357
     rturk (2.12.1)
332 358
       erector
333 359
       nokogiri
334 360
       rest-client
335 361
     ruby-growl (4.1)
336 362
       uuid (~> 2.3, >= 2.3.5)
337
-    rufus-scheduler (3.0.8)
363
+    rufus-scheduler (3.0.9)
338 364
       tzinfo
339 365
     safe_yaml (1.0.4)
340
-    sass (3.2.19)
341
-    sass-rails (4.0.3)
366
+    sass (3.4.12)
367
+    sass-rails (5.0.1)
342 368
       railties (>= 4.0.0, < 5.0)
343
-      sass (~> 3.2.0)
344
-      sprockets (~> 2.8, <= 2.11.0)
345
-      sprockets-rails (~> 2.0)
346
-    select2-rails (3.5.9.1)
369
+      sass (~> 3.1)
370
+      sprockets (>= 2.8, < 4.0)
371
+      sprockets-rails (>= 2.0, < 4.0)
372
+      tilt (~> 1.1)
373
+    select2-rails (3.5.9.3)
347 374
       thor (~> 0.14)
348
-    shoulda-matchers (2.7.0)
375
+    shoulda-matchers (2.8.0)
349 376
       activesupport (>= 3.0.0)
350 377
     signet (0.5.1)
351 378
       addressable (>= 2.2.3)
@@ -354,24 +381,24 @@ GEM
354 381
       multi_json (>= 1.0.0)
355 382
     simple-rss (1.3.1)
356 383
     simple_oauth (0.2.0)
357
-    simplecov (0.9.0)
384
+    simplecov (0.9.2)
358 385
       docile (~> 1.1.0)
359
-      multi_json
360
-      simplecov-html (~> 0.8.0)
361
-    simplecov-html (0.8.0)
386
+      multi_json (~> 1.0)
387
+      simplecov-html (~> 0.9.0)
388
+    simplecov-html (0.9.0)
362 389
     slack-notifier (1.0.0)
363 390
     slop (3.6.0)
364 391
     spectrum-rails (1.3.4)
365 392
       railties (>= 3.1)
366 393
     spring (1.3.3)
367
-    spring-commands-rspec (1.0.2)
394
+    spring-commands-rspec (1.0.4)
368 395
       spring (>= 0.9.1)
369
-    sprockets (2.11.0)
396
+    sprockets (2.12.3)
370 397
       hike (~> 1.2)
371 398
       multi_json (~> 1.0)
372 399
       rack (~> 1.0)
373 400
       tilt (~> 1.1, != 1.3.0)
374
-    sprockets-rails (2.2.2)
401
+    sprockets-rails (2.2.4)
375 402
       actionpack (>= 3.0)
376 403
       activesupport (>= 3.0)
377 404
       sprockets (>= 2.8, < 4.0)
@@ -383,9 +410,10 @@ GEM
383 410
       libv8 (~> 3.16.14.0)
384 411
       ref
385 412
     thor (0.19.1)
386
-    thread_safe (0.3.4)
413
+    thread_safe (0.3.5)
387 414
     tilt (1.4.1)
388
-    timers (1.1.0)
415
+    timers (4.0.1)
416
+      hitimes
389 417
     tins (1.3.2)
390 418
     treetop (1.5.3)
391 419
       polyglot (~> 0.3)
@@ -415,7 +443,7 @@ GEM
415 443
       ethon (>= 0.7.1)
416 444
     tzinfo (1.2.2)
417 445
       thread_safe (~> 0.1)
418
-    uglifier (2.5.3)
446
+    uglifier (2.7.0)
419 447
       execjs (>= 0.3.0)
420 448
       json (>= 1.8.0)
421 449
     unicorn (4.8.3)
@@ -451,7 +479,7 @@ DEPENDENCIES
451 479
   binding_of_caller
452 480
   bootstrap-kaminari-views (~> 0.0.3)
453 481
   bundler (>= 1.5.0)
454
-  coffee-rails (~> 4.0.0)
482
+  coffee-rails (~> 4.1.0)
455 483
   coveralls
456 484
   daemons (~> 1.1.9)
457 485
   delayed_job (~> 4.0.0)
@@ -466,7 +494,7 @@ DEPENDENCIES
466 494
   faraday_middleware
467 495
   feed-normalizer
468 496
   ffi (>= 1.9.4)
469
-  font-awesome-sass
497
+  font-awesome-sass (~> 4.3)
470 498
   forecast_io (~> 2.0.0)
471 499
   foreman (~> 0.63.0)
472 500
   geokit (~> 1.8.4)
@@ -500,22 +528,22 @@ DEPENDENCIES
500 528
   pry
501 529
   quiet_assets
502 530
   rack
503
-  rails (= 4.1.8)
531
+  rails (= 4.2.1)
504 532
   rails_12factor
505 533
   rr
506
-  rspec (~> 3.0)
507
-  rspec-collection_matchers (~> 1.0.0)
508
-  rspec-html-matchers (~> 0.6.1)
509
-  rspec-rails (~> 3.0.1)
534
+  rspec (~> 3.2)
535
+  rspec-collection_matchers (~> 1.1.0)
536
+  rspec-html-matchers (~> 0.7)
537
+  rspec-rails (~> 3.1)
510 538
   rturk (~> 2.12.1)
511 539
   ruby-growl (~> 4.1.0)
512 540
   rufus-scheduler (~> 3.0.8)
513
-  sass-rails (~> 4.0.0)
541
+  sass-rails (~> 5.0)
514 542
   select2-rails (~> 3.5.4)
515 543
   shoulda-matchers
516 544
   slack-notifier (~> 1.0.0)
517 545
   spectrum-rails
518
-  spring (~> 1.3.2)
546
+  spring (~> 1.3.0)
519 547
   spring-commands-rspec
520 548
   string-scrub
521 549
   therubyracer (~> 0.12.1)

+ 1 - 1
app/models/agent.rb

@@ -46,7 +46,7 @@ class Agent < ActiveRecord::Base
46 46
   belongs_to :user, :inverse_of => :agents
47 47
   belongs_to :service, :inverse_of => :agents
48 48
   has_many :events, -> { order("events.id desc") }, :dependent => :delete_all, :inverse_of => :agent
49
-  has_one  :most_recent_event, :inverse_of => :agent, :class_name => "Event", :order => "events.id desc"
49
+  has_one  :most_recent_event, -> { order("events.id desc") }, :inverse_of => :agent, :class_name => "Event"
50 50
   has_many :logs,  -> { order("agent_logs.id desc") }, :dependent => :delete_all, :inverse_of => :agent, :class_name => "AgentLog"
51 51
   has_many :received_events, -> { order("events.id desc") }, :through => :sources, :class_name => "Event", :source => :events
52 52
   has_many :links_as_source, :dependent => :delete_all, :foreign_key => "source_id", :class_name => "Link", :inverse_of => :source

+ 2 - 2
app/models/agents/trigger_agent.rb

@@ -9,9 +9,9 @@ module Agents
9 9
 
10 10
       The `rules` array contains hashes of `path`, `value`, and `type`.  The `path` value is a dotted path through a hash in [JSONPaths](http://goessner.net/articles/JsonPath/) syntax.
11 11
 
12
-      The `type` can be one of #{VALID_COMPARISON_TYPES.map { |t| "`#{t}`" }.to_sentence} and compares with the `value`.
12
+      The `type` can be one of #{VALID_COMPARISON_TYPES.map { |t| "`#{t}`" }.to_sentence} and compares with the `value`.  Note that regex patterns are matched case insensitively.  If you want case sensitive matching, prefix your pattern with `(?-i)`.
13 13
 
14
-      The `value` can be a single value or an array of values. In the case of an array, if one or more values match then the rule matches. 
14
+      The `value` can be a single value or an array of values. In the case of an array, if one or more values match then the rule matches.
15 15
 
16 16
       All rules must match for the Agent to match.  The resulting Event will have a payload message of `message`.  You can use liquid templating in the `message, have a look at the [Wiki](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) for details.
17 17
 

+ 3 - 0
config/application.rb

@@ -49,5 +49,8 @@ module Huginn
49 49
     # Enable the asset pipeline
50 50
     config.assets.enabled = true
51 51
     config.assets.initialize_on_precompile = false
52
+
53
+    # Do not swallow errors in after_commit/after_rollback callbacks.
54
+    config.active_record.raise_in_transactional_callbacks = true
52 55
   end
53 56
 end

+ 1 - 1
config/boot.rb

@@ -3,4 +3,4 @@ require 'rubygems'
3 3
 # Set up gems listed in the Gemfile.
4 4
 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5 5
 
6
-require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
6
+require 'bundler/setup' # Set up gems listed in the Gemfile.

+ 4 - 0
config/environments/development.rb

@@ -33,6 +33,10 @@ Huginn::Application.configure do
33 33
   # Expands the lines which load the assets
34 34
   config.assets.debug = true
35 35
 
36
+  # Asset digests allow you to set far-future HTTP expiration dates on all assets,
37
+  # yet still be able to expire them through the digest params.
38
+  config.assets.digest = true
39
+
36 40
   config.action_mailer.default_url_options = { :host => ENV['DOMAIN'] }
37 41
   config.action_mailer.asset_host = ENV['DOMAIN']
38 42
   config.action_mailer.perform_deliveries = false # Enable when testing!

+ 7 - 8
config/environments/production.rb

@@ -16,11 +16,13 @@ Huginn::Application.configure do
16 16
 
17 17
   # Enable Rack::Cache to put a simple HTTP cache in front of your application
18 18
   # Add `rack-cache` to your Gemfile before enabling this.
19
-  # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
19
+  # For large-scale production use, consider using a caching reverse proxy like
20
+  # NGINX, varnish or squid.
20 21
   # config.action_dispatch.rack_cache = true
21 22
 
22
-  # Disable Rails's static asset server (Apache or nginx will already do this)
23
-  config.serve_static_assets = ENV['SERVE_STATIC_ASSETS']
23
+  # Disable serving static files from the `/public` folder by default since
24
+  # Apache or NGINX already handles this.
25
+  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
24 26
 
25 27
   # Compress JavaScripts and CSS
26 28
   config.assets.js_compressor  = :uglifier
@@ -43,8 +45,8 @@ Huginn::Application.configure do
43 45
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
44 46
   config.force_ssl = ENV['FORCE_SSL'] == 'true'
45 47
 
46
-  # See everything in the log (default is :info)
47
-  # config.log_level = :debug
48
+  # See everything in the log (default is will be :debug in Rails 5.0)
49
+  config.log_level = :info
48 50
 
49 51
   # Prepend all log lines with the following tags
50 52
   config.log_tags = [ :uuid ] # :subdomain
@@ -74,9 +76,6 @@ Huginn::Application.configure do
74 76
   # Send deprecation notices to registered listeners
75 77
   config.active_support.deprecation = :notify
76 78
 
77
-  # Disable automatic flushing of the log to improve performance.
78
-  # config.autoflush_log = false
79
-
80 79
   # Use default logging formatter so that PID and timestamp are not suppressed.
81 80
   config.log_formatter = ::Logger::Formatter.new
82 81
 

+ 4 - 1
config/environments/test.rb

@@ -13,7 +13,7 @@ Huginn::Application.configure do
13 13
   config.eager_load = false
14 14
 
15 15
   # Configure static asset server for tests with Cache-Control for performance
16
-  config.serve_static_assets = true
16
+  config.serve_static_files = true
17 17
   config.static_cache_control = "public, max-age=3600"
18 18
 
19 19
   # Show full error reports and disable caching
@@ -36,6 +36,9 @@ Huginn::Application.configure do
36 36
   # Raise exception on mass assignment protection for Active Record models
37 37
   config.active_record.mass_assignment_sanitizer = :strict
38 38
 
39
+  # Randomize the order test cases are executed.
40
+  config.active_support.test_order = :random
41
+
39 42
   # Print deprecation notices to the stderr
40 43
   config.active_support.deprecation = :stderr
41 44
 

+ 5 - 6
spec/models/agents/website_agent_spec.rb

@@ -379,13 +379,12 @@ describe Agents::WebsiteAgent do
379 379
             checker.check
380 380
           }.to change { Event.count }.by(2)
381 381
 
382
-          event = Event.all[-1]
383
-          expect(event.payload['version']).to eq(2.5)
384
-          expect(event.payload['title']).to eq("second")
382
+          (event2, event1) = Event.last(2)
383
+          expect(event1.payload['version']).to eq(2.5)
384
+          expect(event1.payload['title']).to eq("second")
385 385
 
386
-          event = Event.all[-2]
387
-          expect(event.payload['version']).to eq(2)
388
-          expect(event.payload['title']).to eq("first")
386
+          expect(event2.payload['version']).to eq(2)
387
+          expect(event2.payload['title']).to eq("first")
389 388
         end
390 389
 
391 390
         it "stores the whole object if :extract is not specified" do

+ 1 - 0
spec/presenters/form_configurable_agent_presenter_spec.rb

@@ -1,6 +1,7 @@
1 1
 require 'spec_helper'
2 2
 
3 3
 describe FormConfigurableAgentPresenter do
4
+  include RSpecHtmlMatchers
4 5
   class FormConfigurableAgentPresenterAgent < Agent
5 6
     include FormConfigurable
6 7